<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class BaseModel extends Model
{
    //fillable和 guarded属性都是laravel的批量赋值方法create()的，fillable表示在create()方法中可以被赋值的字段，对应的是 guarded表示在create()方法中不能被赋值的字段
    protected $guarded = ['id'];
    //protected $fillable = ['id'];
    //属性可以隐藏字段，使其不出现在数组或者json格式中
    protected $hidden = ['deleted_at', 'extra'];

//    protected $table = 'user';
//    protected $primaryKey = 'id';
//    public $timestamps = false;

}
